﻿using System;

using MbUnit.Framework;

namespace Abstract2ion.Tests
{
	/// <remarks>
	/// I'm aware that these tests are less effective if your timezone is UTC, but I'm just going to live with that.
	/// </remarks>
	public class TimeSourceTestFixture
	{
		[Test]
		public void ShouldFindLocalTime()
		{
			var initialTime = DateTime.Now;

			var result = new TimeSource().Local;

			Assert.Between(result, initialTime, DateTime.Now);
		}

		[Test]
		public void ShouldFindUtcTime()
		{
			var initialTime = DateTime.UtcNow;

			var result = new TimeSource().Utc;

			Assert.Between(result, initialTime, DateTime.UtcNow);
		}
	}
}